﻿Type.registerNamespace("Microsoft.Live.ClientControls.VE.Extenders")
Microsoft.Live.ClientControls.VE.Extenders.CenterAndZoom=function(element){
Microsoft.Live.ClientControls.VE.Extenders.CenterAndZoom.initializeBase(this,[element])
this._mode
this._center
this._zoomLevel
this._mapControlID}
Microsoft.Live.ClientControls.VE.Extenders.CenterAndZoom.prototype={
initialize : function(){
Microsoft.Live.ClientControls.VE.Extenders.CenterAndZoom.callBaseMethod(this,'initialize')
$addHandler(this.get_element(),"click",Function.createDelegate(this,this._onClick))
},
get_Mode : function(){
return this._mode
},
set_Mode : function(value){
this._mode=value
},
get_Center : function(){
return this._center
},
set_Center : function(value){
this._center=value
},
get_ZoomLevel : function(){
return this._zoomLevel
},
set_ZoomLevel : function(value){
this._zoomLevel=value
},
get_MapControlID : function(){
return this._mapControlID
},
set_MapControlID : function(value){
this._mapControlID=value
},
_onClick : function(e){
var mapcontrol=$find(this._mapControlID)
if(mapcontrol){
switch(this._mode){
case 0:
mapcontrol.set_Center(this._center)
break
case 1:
mapcontrol.set_ZoomLevel(this._zoomLevel)
break
case 2:
mapcontrol.set_Center(this._center)
mapcontrol.set_ZoomLevel(this._zoomLevel)
break
case 3:
mapcontrol.ZoomIn()
break
case 4:
mapcontrol.ZoomOut()
break}}
e.preventDefault()
},
dispose : function(){
$clearHandlers(this.get_element())
Microsoft.Live.ClientControls.VE.Extenders.CenterAndZoom.callBaseMethod(this,'dispose')}}
Microsoft.Live.ClientControls.VE.Extenders.CenterAndZoom.registerClass("Microsoft.Live.ClientControls.VE.Extenders.CenterAndZoom",Sys.UI.Behavior)
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded()
